/**
 * @file RuneDetector.h
 * @author 刘晨光 (Ermaotie@163.com)
 * @brief 
 * @version 0.1
 * @date 2021-10-01
 * 
 * @copyright Copyright (c) 2021
 * 
 */
#pragma once
#include <opencv2/opencv.hpp>

using namespace std;
using namespace cv;

class RuneDetector
{
private:
    String video_path;
    Scalar line_color;
    Scalar point_color;
    // 每帧延时时间
    int delay;

    Mat src; // 每帧源图像
    vector<Mat> channels;
    Mat b_channel;

    double thresh;
    // 按阈值二值化后图层
    Mat threshold_mask;
    vector<vector<Point>> contours;
    vector<Vec4i> hierarchy;

public:
    RuneDetector(String);
    ~RuneDetector() = default;
    void run();
};
